import { EditType } from '@/types/BaseEnum'
import { ref } from 'vue'

export default function useVisitor() {
    const detailRef = ref<{
        show: (type: string, id: number) => void
    }>()

    // 详情
    const detailBtn = async (id: number) => {
        detailRef.value?.show(EditType.EDIT, id)
    }

    return {
        detailBtn,
        detailRef
    }
}
